import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
        {
            path: '/',
            component: () => import('../views/layout/index.vue'),
            redirect: '/index',
            children: [
                {
                    path: '/index',
                    component: () => import('../views/index/index.vue')
                },
                {
                    path: '/font',
                    component: () => import('../views/font/reservation.vue')
                },
                {
                    path: '/system',
                    children: [
                            {
                                path: '/system/department',
                                component: () => import('../views/system/department.vue')
                            },
                            {
                                path: '/system/employee',
                                component: () => import('../views/system/employee.vue')
                            },
                            {
                                path: '/system/role',
                                component: () => import('../views/system/role.vue')
                            },
                            {
                                path: '/system/institution',
                                component: () => import('../views/system/institution.vue')
                            }
                    ]
                },
                {
                    path: '/basic',
                    children: [
                        {
                            path: '/basic/program',
                            component: () => import('../views/basic/program.vue')
                        },
                        {
                            path: '/basic/thali',
                            component: () => import('../views/basic/thali.vue')
                        },

                    ]
                },
                {
                    path: '/customer',
                    children: [
                        {path: '/customer/enterprise', component: () => import('../views/customer/enterprise.vue')},
                        {path: '/customer/person', component: () => import('../views/customer/person.vue')},
                        {path: '/customer/unit', component: () => import('../views/customer/unit.vue')},
                    ]
                },
                {
                    path: '/reservation',
                    children: [
                            {
                                path: '/reservation/today',
                                component: () => import('../views/reservation/today.vue')
                            },
                            {
                                path: '/reservation/all',
                                component: () => import('../views/reservation/all.vue')
                            },
                    ]
                },
                {
                    path: '/report',
                    children: [
                            {
                                path: '/report/abnormal',
                                component: () => import('../views/report/abnormal.vue')
                            },
                            {
                                path: '/report/allReport',
                                component: () => import('../views/report/allReport.vue')
                            },
                    ]
                },
                {
                    path: '/statistics',
                    component: () => import('../views/statistics/index.vue')
                },
            ]
        },

]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
